﻿using OMG.Fill.Vegetable.Model.Ent;
using OMG.Fill.Vegetable.Service;
using ProjectShare;
using System.Collections.Generic;
using System.Web.Http;
namespace OMG.Fill.Vegetable.Model.UI.Controllers
{
    public class MRActionController : ApiController
    {
        MRActionServices mRActionServices = new MRActionServices();
        
        //[ApiActionAuthorize("获取角色模块操作权限分页列表对象操作")]
        //[ApiActionException]
        public Pager<List<MRActionEntity>> PostPageList(MRActionQuery query)
        {
            return mRActionServices.GetPageList(query);
        }
        //[ApiActionAuthorize("新增角色模块操作权限指定对象操作")]
        //[ApiActionException]
        public ResResult<int> Post(MRActionEntity model) {
            return mRActionServices.AddInfo(model);
        }
        //[ApiActionAuthorize("修改角色模块操作权限指定对象操作")]
        //[ApiActionException]
        public ResResult<int> Put(MRActionEntity model)
        {
            return mRActionServices.UpdateInfo(model);
        }
        //[ApiActionAuthorize("删除角色模块操作权限指定对象操作")]
        //[ApiActionException]
        public ResResult<int> Delete(string id)
        {
            return mRActionServices.DeleteInfo(id);
        }
        //[ApiActionAuthorize("获取角色模块操作权限指定对象操作")]
        //[ApiActionException]
        public ResResult<MRActionEntity> Get(string id)
        {
            return mRActionServices.GetModel(id);
        }
    }
}